package com.zyg.cart.client;

import com.zyg.cart.client.impl.ManagerClientImpl;
import com.zyg.cart.entity.ItemEntity;
import com.zyg.common.utils.R;
import org.junit.Before;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * ------------------------------
 * 功能：
 * 作者：WF
 * 微信：hbxfwf13590332912
 * 创建时间：2021/11/15-14:59
 * ------------------------------
 */
@FeignClient(value="zyg-manager"/*,fallback = ManagerClientImpl.class*/)
public interface ManagerClient {

    //1. 根据sku商品的id，查询sku商品对象
    @GetMapping("manager/item/info/{id}")
    R info(@PathVariable("id") Long id);

    //2. 根据id得到商品
    @GetMapping("manager/item/findById/{id}")
    ItemEntity findById(@PathVariable("id") Long id);
}
